﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Zo.Extensions;

namespace ZoLone.Models.Sys
{
    public class Sys_Operation
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Right { get; set; }
        public int ParentId { get; set; }
        public int CreateTime { get; set; } = DateTime.UtcNow.GetTimeStamp();
        public string Icon { get; set; } = "fa fa-circle-o";
        public int IsMenu { get; set; }
        public int Sort { get; set; }

        public int IsTopClickMenu { get; set; } = (int)IsTop.yes;

        [NotMapped]
        public List<Sys_Operation> Child { get; set; }

        [NotMapped]
        public string Active { get; set; }

        [NotMapped]
        public bool Check { get; set; }

        [NotMapped]
        public string Url { get; set; }

        public enum IsMenuState
        {
            /// <summary>
            /// 是菜单
            /// </summary>
            yes = 1,
            /// <summary>
            /// 不是菜单
            /// </summary>
            no = 0
        }
        public enum IsTop
        {
            /// <summary>
            /// 是一级点击菜单
            /// </summary>
            yes = 1,
            /// <summary>
            /// 不是一级点击菜单
            /// </summary>
            no = 0
        }
    }
}
